home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / windows / games / xlmath21.arj / SOURCE.ZIP / MAKEFILE next >
Text File  |  1993-04-10  |  3KB  |  122 lines

  1. # Makefile : Builds Xlmath
  2. #
  3. # Usage:    NMAKE                    (build application)
  4. #       :    NMAKE DEBUG[0|1]        (build debug version)
  5. #       :    NMAKE SMART[0|1]         (build application using SMRTHEAP.DLL
  6. #       :    NMAKE clean                (erase compiled files)
  7. #
  8. # Note:        The files xlauto.c, xlutil.c xlutil.h are in the subdirectory
  9. #            \xll. All other files are in the subdirectory
  10. #            \xll\xlmath. The modules xlauto and xlutil contain general 
  11. #            useful in building other XLL's and are thus kept separate from
  12. #            the xlmath specific functions.
  13. #
  14.  
  15. NAME    = xlmath
  16. CFLAGS    = -c -ALw -GD -G2s -Zp -W3
  17. INCLUDE=\C700\INCLUDE;\WINDEV\INCLUDE;\SRC\XLL;\SRC\XLL\XLMATH;
  18. SRC1    = xlminit.c xlmdlg.c $(NAME).c xlmdiag.c xlmcurve.c xlmcfit.c
  19. ## directory with xlauto.c xlutil.c & xlutil.h
  20. XLDIR    = ..
  21. SRC2    = $(XLDIR)\xlauto.c $(XLDIR)\xlutil.c
  22. OBJ2    = $(XLDIR)\xlauto.obj $(XLDIR)\xlutil.obj
  23.  
  24. ##### C7 Macro #####
  25. C7    = 1
  26.  
  27. ##### Include Macro #####
  28. INCL1    = $(XLDIR)\xlutil.h
  29. INCL2    = $(NAME).h $(INCLU) xlmcurve.h xlmcfit.h
  30.  
  31. ##### Resource Macro #####
  32. RCFILES = $(NAME).rc
  33.  
  34. ##### Library Macros #####
  35. #    the libraries lxlfrmd & lxlfrm are the large model 
  36. #    debug and non-debugging versions of framework (Excel-SDK)
  37. #    
  38. !if "$(DEBUG)"=="1"
  39. LIB1    = libw ldllcew xlcall lxlfrmd
  40. DDEF    = -DDEBUG
  41. CLOPT    = -Zid -Od
  42. MOPT    = -Zi
  43. LOPT    = /CO /LI /MAP
  44. !else
  45. LIB1    = libw ldllcew xlcall lxlfrm
  46. DDEF    =
  47. CLOPT    = -Os
  48. LOPT    =
  49. !endif
  50.  
  51. ##### SMARTHEAP flag defined ####
  52. !if "$(SMART)"=="1"
  53. CSMART     = /D_USE_SMARTHEAP
  54. LIB2    = smrtheap
  55. !else
  56. CSMART    =    
  57. LIB2    = 
  58. !endif
  59.  
  60. ##### General Macros #####
  61. #
  62. DEF    = -D_XLMATH        #defines xlmath specific in xlutil.c and xlauto.c
  63.  
  64. ##### Tool Macros #####
  65. CC    = cl $(CFLAGS) $(CLOPT) $(CSMART) $(DDEF) $(DEF)
  66. LINK    = link /NOD /NOE $(LOPT)
  67. RC    = rc $(DDEF) $(DEF)
  68. HC    = hc
  69.  
  70. ##### Inference Rules #####
  71. .c.obj:
  72.     $(CC) $*.c
  73.  
  74. {$(XLDIR)\}.c.obj:
  75.     $(CC) $<
  76.  
  77. .rc.res:
  78.     $(RC) -r $*.rc
  79.  
  80. ##### Main (default) Target #####
  81. all: $(NAME).xll $(SRC2:.c=.obj)
  82.  
  83. $(XLDIR)\xlauto.obj : xlauto.obj
  84.     copy xlauto.obj $(XLDIR)\*.*
  85.  
  86. $(XLDIR)\xlutil.obj : xlutil.obj
  87.     copy xlutil.obj $(XLDIR)\*.*
  88.     
  89. ##### Dependents For Goal and Command Line #####
  90. $(NAME).xll: $(SRC1:.c=.obj) $(SRC2:.c=.obj) $(NAME).def $(NAME).res 
  91.     $(LINK) @<<
  92.     $(SRC1:.c=.obj) $(SRC2:.c=.obj),
  93.     $(NAME).xll,
  94.     $(NAME).map,
  95.     $(LIB1) $(LIB2),
  96.     $(NAME).def
  97. <<
  98.     $(RC) -p -T $(NAME).res $(NAME).xll
  99.  
  100. !if "$(DEBUG)"=="1"
  101. !if !$(C7)
  102.     cvpack -p $(NAME).xll
  103. !endif
  104.     mapsym $(NAME).map
  105. !endif
  106.  
  107. ##### Dependents #####
  108. $(SRC1:.c=.obj):  $(INCL1) $(INCL2)
  109. $(SRC2:.c=.obj):  $(INCL2)
  110. $(NAME).res: $(RCFILES) $(INCL1)
  111.  
  112. ##### Clean Directory #####
  113. clean:
  114.     -del errors
  115.     -del *.obj
  116.     -del *.res
  117.     -del *.map
  118.     -del *.sym
  119.     -del *.@*
  120.     -del *.bak
  121.     -del $(XLDIR)\*.obj
  122.